Conversation
src/d/actor/d_a_ep.cpp
Outdated
| /* 80468A70-80468A90 0008F0 0020+00 1/1 0/0 0/0 .text hahen_normal__FP8ep_classP10ep_hahen_s */ | ||
| static void hahen_normal(ep_class* param_0, ep_hahen_s* param_1) { | ||
| // NONMATCHING | ||
| static void hahen_normal(ep_class* e_this, ep_hahen_s* i_this) { |
There was a problem hiding this comment.
the use of e_this and i_this throughout the whole TU should be cleaned up to use i_this for ep_class and hahen_s for ep_hahen_s.
src/d/actor/d_a_ep.cpp
Outdated
| 0x0103, 0x8112 | ||
| }; | ||
|
|
||
| cXyz local_1c = cXyz(e_this->field_0x634.x, e_this->field_0x634.y + -240.0f + 235.0f +15.0f, e_this->field_0x634.z); |
There was a problem hiding this comment.
should just be cXyz sp1C(...
src/d/actor/d_a_ep.cpp
Outdated
| e_this->mSph1.OffAtSetBit(); | ||
| } | ||
|
|
||
| e_this->mSph1.SetC(cXyz(e_this->field_0x634.x, e_this->field_0x634.y + 30.0f, e_this->field_0x634.z)); |
There was a problem hiding this comment.
this cXyz should be put on the stack since it doesn't call a destructor immediately after
src/d/actor/d_a_ep.cpp
Outdated
| JGeometry::TVec3<float> aTStack_88; | ||
| aTStack_88 = cStack_40; | ||
| JPABaseEmitter* emitter = (JPABaseEmitter*)e_this->field_0x610; | ||
| emitter->setDirection(aTStack_88); |
There was a problem hiding this comment.
you shouldnt need to explicitly create a TVec3 here, just passing in a cXyz should implicitly do the conversion. also emitter shouldnt be stored to a temp var, you can just call the member var directly
src/d/actor/d_a_ep.cpp
Outdated
| emitter = (JPABaseEmitter*)e_this->field_0x610; | ||
| emitter->becomeInvalidEmitter(); |
There was a problem hiding this comment.
same thing here, no temp needed
src/d/actor/d_a_ep.cpp
Outdated
|
|
||
| /* 8046A6D4-8046A6DC 002554 0008+00 1/0 0/0 0/0 .text daEp_IsDelete__FP8ep_class */ | ||
| static bool daEp_IsDelete(ep_class* param_0) { | ||
| static bool daEp_IsDelete(ep_class* e_this) { |
src/d/actor/d_a_ep.cpp
Outdated
| rv = 0; | ||
| } else { | ||
| MtxScale(0.0f, 0.0f, 0.0f, 0); | ||
| e_this->mpModel->setBaseTRMtx(*calc_mtx); | ||
|
|
||
| modelData = (J3DModelData*)dComIfG_getObjectRes("Ep", 7); | ||
| JUT_ASSERT(0x884, modelData != 0); | ||
|
|
||
| for (int i = 0; i < 6; i++) { | ||
| e_this->mHahen[i].mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); | ||
| if (e_this->mHahen[i].mpModel == NULL) { | ||
| return 0; | ||
| } | ||
| } | ||
| rv = 1; | ||
| } |
There was a problem hiding this comment.
using here as an example but probably in many other places in this TU, the rv temp isn't necessary. just return the value directly, and it'll also let you remove the unnecessary else block nesting
There was a problem hiding this comment.
I went through and got rid of rv where it wasn't needed to match
src/d/actor/d_a_ep.cpp
Outdated
|
|
||
| e_this->field_0x5a4 = 0; | ||
| e_this->field_0x60d = 0; | ||
| e_this->cullMtx = e_this->field_0x570; |
src/d/actor/d_a_ep.cpp
Outdated
|
|
||
| if (i_this->field_0xa5a < 0) { | ||
| #ifdef DEBUG | ||
| OSReport(" ///// EP PARAM %x\n"); |
There was a problem hiding this comment.
you can use the OS_REPORT macro to avoid having to wrap OSReport calls in ifdefs
No description provided.